package com.buaa.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class UserExtensionDTO implements Serializable {

    private String userName;
    private String policeId;
    // private UserExtension userExtension;
    private Integer id; // extension table 的id
    private Integer userId; // user table 的 id
    private String gender;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime dateOfBirth;

    @NotNull(message = "入职日期不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime joinDate;

    private String policeRank; //职务

    private String department; //警察所在的部门（如：交警大队、指挥中心等）
    private String dutyStation; //警察的执勤地点（如：某路口、某交警队等）
    private String phoneNumber; //电话号码

    @Email(message = "邮箱不合法")
    private String email;       // 用户邮箱
    private String homeAddress; //家庭地址
    private String policeProvince;
    private String policeCity;
    private String policeOrg;
    private String stationId;
    private String emergencyContactName;
    private String emergencyContactPhone;
    private Integer isActive; //是否激活 isActive;
    private String createBy;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;
    private String reviser; //修改人

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime revisionTime;
}
